package com.bawei.module_message.http

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class MessageRepository @Inject constructor() {
    @Inject
    @MessageNetModule.CommonMessageApi
    lateinit var api: Api

    fun getMessage(accessId: String, userId: Int)= flow{
        emit(api.getMessage(accessId, userId))
    }.flowOn(Dispatchers.IO)
}